package com.pyue.eam.regi.mapper;

import com.pyue.eam.admin.api.base.BaseResult;
import com.pyue.eam.admin.api.entity.regi.CqTaskAccept;
import com.pyue.eam.admin.api.entity.regi.CqTaskCheck;
import com.pyue.eam.admin.api.entity.regi.CqTaskLibEntity;
import com.pyue.eam.common.data.datascope.EamBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.YearMonth;
import java.util.List;

@Mapper
public interface CqTaskLibMapper extends EamBaseMapper<CqTaskLibEntity> {

    /**
     * 任务预计和实际数量
     */
    List<CqTaskLibEntity> taskArcbarData();

    /**
     * 月发布任务数
     */
    Integer monthTaskNewCount(@Param("yearMonth") YearMonth yearMonth);

    /**
     * 月任务完成数
     */
    Integer monthTaskOverCount(@Param("yearMonth") YearMonth yearMonth);

    CqTaskAccept getAcceptInfo(@Param("taskId") Long taskId);

    CqTaskCheck getCheckInfo(@Param("taskId") Long taskId);

    BaseResult getRegiIdAndCompanyId(@Param("taskId") Long taskId);

    List<CqTaskLibEntity> workerTaskList(@Param("userId") Long userId);
}
